<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>网络安全态势报告</title>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        :root {
            --primary: #2E95F8;
            --danger: #FF4D4F;
            --warning: #FAAD14;
            --success: #52C41A;
        }

        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background: #060606;
            color: #E9EAEC;
            line-height: 1.6;
        }

        .row {
            display: flex;
            gap: 24px;
            margin-bottom: 24px;
        }

        .col {
            flex: 1;
        }

        .page {
            max-width: 1400px;
            margin: 24px auto;
            padding: 0 16px;
        }

        .header {
            margin-bottom: 24px;
            padding: 24px;
            background-color: #09162F;
            border-radius: 4px;
            border-left: 4px solid #129BFF;
        }

        .header h1 {
            color: #129BFF;
            margin-bottom: 8px;
        }

        .header p {
            color: #A3B1C6;
        }

        .card {
            border-radius: 4px;
            padding: 20px;
            border: 1px solid #1B64AA;
            background: rgba(8, 26, 48, 0.8);
            height: 100%;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .card-title {
            margin-bottom: 16px;
            font-size: 18px;
            color: #2E95F8;
            display: flex;
            align-items: center;
        }

        .card-title i {
            margin-right: 8px;
            font-size: 20px;
        }

        .overview {
            display: flex;
            gap: 24px;
            flex-wrap: wrap;
        }

        .overview-item {
            flex: 1;
            min-width: 200px;
            background: rgba(18, 155, 255, 0.1);
            padding: 16px;
            border-radius: 4px;
            border-left: 3px solid var(--primary);
        }

        .overview-item.danger {
            border-left-color: var(--danger);
            background: rgba(255, 77, 79, 0.1);
        }

        .overview-item.warning {
            border-left-color: var(--warning);
            background: rgba(250, 173, 20, 0.1);
        }

        .overview-item.success {
            border-left-color: var(--success);
            background: rgba(82, 196, 26, 0.1);
        }

        .overview-item .label {
            font-size: 14px;
            color: #A3B1C6;
            margin-bottom: 8px;
        }

        .overview-item .value {
            font-size: 24px;
            font-weight: bold;
        }

        .chart-container {
            position: relative;
            height: 300px;
            width: 100%;
        }

        .risk-badge {
            display: inline-block;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 12px;
            font-weight: bold;
            margin-left: 8px;
        }

        .risk-high {
            background-color: var(--danger);
            color: white;
        }

        .risk-medium {
            background-color: var(--warning);
            color: #333;
        }

        .risk-low {
            background-color: var(--success);
            color: white;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 16px;
        }

        .data-table th,
        .data-table td {
            padding: 12px 16px;
            text-align: left;
            border-bottom: 1px solid #1B64AA;
        }

        .data-table th {
            background-color: rgba(18, 155, 255, 0.1);
            color: #2E95F8;
        }

        .data-table tr:hover {
            background-color: rgba(18, 155, 255, 0.05);
        }

        .timeline {
            position: relative;
            padding-left: 24px;
            margin-top: 16px;
        }

        .timeline::before {
            content: '';
            position: absolute;
            left: 7px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: #1B64AA;
        }

        .timeline-item {
            position: relative;
            padding-bottom: 16px;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            left: -24px;
            top: 4px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #2E95F8;
            border: 2px solid #1B64AA;
        }

        .timeline-date {
            font-weight: bold;
            color: #2E95F8;
            margin-bottom: 4px;
        }

        .recommendation-list {
            list-style-type: none;
        }

        .recommendation-list li {
            padding: 8px 0;
            border-bottom: 1px dashed #1B64AA;
            display: flex;
            align-items: flex-start;
        }

        .recommendation-list li::before {
            content: '•';
            color: #2E95F8;
            font-weight: bold;
            display: inline-block;
            width: 20px;
            font-size: 20px;
        }

        @media (max-width: 768px) {
            .row {
                flex-direction: column;
            }

            .overview {
                flex-direction: column;
            }

            .overview-item {
                min-width: 100%;
            }
        }
    </style>
</head>

<body>

    <div class="page">

        <!-- 头部 -->
        <div class="header">
            <h1>网络安全态势报告 <span class="risk-badge risk-high">高危</span></h1>
            <p>攻击类型集中度、攻击量激增、关键资产暴露面显著</p>
        </div>

        <div class="main">

            <!-- 一列布局 - 概览 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">安全态势概览</h2>
                        <div class="card-body">
                            <div class="overview">
                                <div class="overview-item danger">
                                    <div class="label">总攻击量</div>
                                    <div class="value">2,242</div>
                                </div>
                                <div class="overview-item danger">
                                    <div class="label">权限提升攻击 (T1548)</div>
                                    <div class="value">1,711 <small>(75.1%)</small></div>
                                </div>
                                <div class="overview-item warning">
                                    <div class="label">关键资产风险值</div>
                                    <div class="value">5,031</div>
                                </div>
                                <div class="overview-item">
                                    <div class="label">预测明日攻击量</div>
                                    <div class="value">1,738</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 两列布局 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">攻击类型分布</h2>
                        <div class="card-body">
                            <div class="chart-container">
                                <canvas id="attackTypeChart"></canvas>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">攻击趋势分析</h2>
                        <div class="card-body">
                            <div class="chart-container">
                                <canvas id="attackTrendChart"></canvas>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 三列布局 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">资产风险对比</h2>
                        <div class="card-body">
                            <div class="chart-container">
                                <canvas id="assetRiskChart"></canvas>
                            </div>
                            <table class="data-table">
                                <tr>
                                    <th>资产类型</th>
                                    <th>风险值</th>
                                    <th>占比</th>
                                </tr>
                                <tr>
                                    <td>CentOS Linux 8.2.2004</td>
                                    <td>5,031</td>
                                    <td>92.1%</td>
                                </tr>
                                <tr>
                                    <td>Windows 8 系统</td>
                                    <td>429</td>
                                    <td>7.9%</td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">关键事件时间线</h2>
                        <div class="card-body">
                            <div class="timeline">
                                <div class="timeline-item">
                                    <div class="timeline-date">5月14日 16:28-16:32</div>
                                    <p>5次权限提升事件集中爆发，与当日总攻击量存在时间重叠</p>
                                </div>
                                <div class="timeline-item">
                                    <div class="timeline-date">5月14日</div>
                                    <p>攻击量1,086次，较前日增长80%</p>
                                </div>
                                <div class="timeline-item">
                                    <div class="timeline-date">5月13日</div>
                                    <p>攻击量605次，较前日增长823%</p>
                                </div>
                                <div class="timeline-item">
                                    <div class="timeline-date">5月10日-14日</div>
                                    <p>攻击量呈斐波那契式增长，日均增长率61.8%</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">核心风险</h2>
                        <div class="card-body">
                            <ul style="list-style-type: none;">
                                <li style="padding: 8px 0; border-bottom: 1px dashed #1B64AA;">
                                    权限提升类攻击(T1548)占75.1%，日均增长61.8%</li>
                                <li style="padding: 8px 0; border-bottom: 1px dashed #1B64AA;">CentOS
                                    Linux风险值为Windows系统的11.8倍</li>
                                <li style="padding: 8px 0; border-bottom: 1px dashed #1B64AA;">80%受影响资产未提供IP地址</li>
                                <li style="padding: 8px 0;">5月14日权限提升事件与总攻击量存在时间重叠</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 一列布局 - 防护建议 -->
            <div class="row">
                <div class="col">
                    <div class="card">
                        <h2 class="card-title">防护建议</h2>
                        <div class="card-body">
                            <ul class="recommendation-list">
                                <li>立即补充资产IP信息并建立资产画像数据库</li>
                                <li>部署基于ATT&CK框架的权限提升攻击实时检测规则</li>
                                <li>对CentOS Linux 8.2.2004资产实施网络隔离与最小权限策略</li>
                                <li>建立攻击类型关联分析模型，监控权限提升后的横向移动行为</li>
                                <li>禁用非必要SUID权限程序，部署文件完整性校验机制</li>
                                <li>限制Windows 8系统的wscript/cscript执行权限</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="footer" style="text-align: center; padding: 20px; color: #A3B1C6; font-size: 14px;">
            报告生成时间: 2023年5月15日 | 数据来源: 安全监测系统
        </div>
    </div>

    <script>
        // 攻击类型分布图
        const attackTypeCtx = document.getElementById('attackTypeChart').getContext('2d');
        const attackTypeChart = new Chart(attackTypeCtx, {
            type: 'doughnut',
            data: {
                labels: ['权限提升攻击 (T1548)', 'Linux At命令 (T1053)', '可疑脚本执行 (T1218)', '其他'],
                datasets: [{
                    data: [1711, 256, 164, 111],
                    backgroundColor: [
                        '#FF4D4F',
                        '#FAAD14',
                        '#2E95F8',
                        '#A3B1C6'
                    ],
                    borderWidth: 0
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        position: 'right',
                        labels: {
                            color: '#E9EAEC'
                        }
                    },
                    tooltip: {
                        callbacks: {
                            label: function (context) {
                                const label = context.label || '';
                                const value = context.raw || 0;
                                const total = context.dataset.data.reduce((a, b) => a + b, 0);
                                const percentage = Math.round((value / total) * 100);
                                return `${label}: ${value} (${percentage}%)`;
                            }
                        }
                    }
                }
            }
        });

        // 攻击趋势图
        const attackTrendCtx = document.getElementById('attackTrendChart').getContext('2d');
        const attackTrendChart = new Chart(attackTrendCtx, {
            type: 'line',
            data: {
                labels: ['5月10日', '5月11日', '5月12日', '5月13日', '5月14日', '5月15日(预测)'],
                datasets: [{
                    label: '攻击量',
                    data: [44, 64, 70, 605, 1086, 1738],
                    borderColor: '#FF4D4F',
                    backgroundColor: 'rgba(255, 77, 79, 0.1)',
                    fill: true,
                    tension: 0.4,
                    pointBackgroundColor: '#FF4D4F',
                    pointRadius: 5,
                    pointHoverRadius: 7
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        labels: {
                            color: '#E9EAEC'
                        }
                    },
                    tooltip: {
                        callbacks: {
                            label: function (context) {
                                const label = context.dataset.label || '';
                                const value = context.raw || 0;
                                let change = '';

                                if (context.dataIndex > 0) {
                                    const prevValue = context.dataset.data[context.dataIndex - 1];
                                    const percentChange = Math.round(((value - prevValue) / prevValue) * 100);
                                    change = ` (${percentChange > 0 ? '+' : ''}${percentChange}%)`;
                                }

                                return `${label}: ${value}${change}`;
                            }
                        }
                    }
                },
                scales: {
                    x: {
                        grid: {
                            color: 'rgba(27, 100, 170, 0.2)'
                        },
                        ticks: {
                            color: '#A3B1C6'
                        }
                    },
                    y: {
                        grid: {
                            color: 'rgba(27, 100, 170, 0.2)'
                        },
                        ticks: {
                            color: '#A3B1C6'
                        }
                    }
                }
            }
        });

        // 资产风险对比图
        const assetRiskCtx = document.getElementById('assetRiskChart').getContext('2d');
        const assetRiskChart = new Chart(assetRiskCtx, {
            type: 'bar',
            data: {
                labels: ['CentOS Linux 8.2.2004', 'Windows 8 系统'],
                datasets: [{
                    label: '风险值',
                    data: [5031, 429],
                    backgroundColor: [
                        'rgba(255, 77, 79, 0.7)',
                        'rgba(250, 173, 20, 0.7)'
                    ],
                    borderColor: [
                        '#FF4D4F',
                        '#FAAD14'
                    ],
                    borderWidth: 1
                }]
            },
            options: {
                responsive: true,
                maintainAspectRatio: false,
                plugins: {
                    legend: {
                        display: false
                    },
                    tooltip: {
                        callbacks: {
                            label: function (context) {
                                return `风险值: ${context.raw}`;
                            }
                        }
                    }
                },
                scales: {
                    x: {
                        grid: {
                            display: false,
                            color: 'rgba(27, 100, 170, 0.2)'
                        },
                        ticks: {
                            color: '#A3B1C6'
                        }
                    },
                    y: {
                        grid: {
                            color: 'rgba(27, 100, 170, 0.2)'
                        },
                        ticks: {
                            color: '#A3B1C6'
                        }
                    }
                }
            }
        });
    </script>
</body>

</html>